local click = script.Parent.Button.ClickDetector local canMake = true local yPos = 0 local zPos = 0 local stepHt = 2 local stepDist = 3 local function makeStep(y, z) wait(.2) local part = Instance.new("Part", workspace) part.Position = Vector3.new(0, y, z) part.Size = Vector3.new(10, .5, 3) part.Anchored = true part.TopSurface = Enum.SurfaceType.Smooth part.BottomSurface = Enum.SurfaceType.Smooth part.BrickColor = BrickColor.Random() local colorName = part.BrickColor.Name return part, colorName end local function makeSteps() if canMake then canMake = false for i=1, 10, 1 do yPos = yPos + stepHt zPos = zPos + stepDist local p1, cName = makeStep(yPos, zPos) p1.Material = Enum.Material.DiamondPlate print("color name = ", cName, "i = ", i) end wait(.2) canMake = true end end click.MouseClick:Connect(makeSteps)